package ThreadExample1;

public class DemoATicket {
    public static void main(String[] args) {
        //创建runnable接口的实现对象
        RunnableImpl runnable = new RunnableImpl();
        //创建thread类对象，构造方法中传递runnable接口的实现类
        Thread thread1 = new Thread(runnable);
        Thread thread2 = new Thread(runnable);
        Thread thread3 = new Thread(runnable);

        thread1.start();//1
        thread2.start();//2
        thread3.start();//3
    }
}
